using SheLife.Domain.Entities;

namespace SheLife.Domain.Interfaces.Repositories
{
    /// <summary>
    /// 系统权限仓储接口
    /// </summary>
    public interface ISystemPermissionRepository : IRepository<SystemPermission>
    {
        Task<IEnumerable<SystemPermission>> GetByUserIdAsync(Guid userId);
        Task<IEnumerable<SystemPermission>> GetByRoleIdAsync(Guid roleId);
        Task<IEnumerable<SystemPermission>> GetByModuleAsync(string module);
        Task<bool> HasPermissionAsync(Guid userId, string permissionKey);
    }
}